<<<<<<< HEAD
/*
 * @Author: your name
 * @Date: 2020-11-20 10:34:00
 * @LastEditTime: 2020-11-20 10:42:51
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \top-six\项目代码\umi-yanxuan\src\api\user.ts
 */
import { request } from 'umi'
import { ILoginData,IDataList } from '@/util/types'

export let login = (data: ILoginData) => {

    return request('/auth/loginByMobile', {

        method: 'POST',
        params: {},
        data: data

    })
}

//首页
export let firstList = () => {

    return request('/', {

        method: 'get',
        params: {},  

    })
}
//商品详情
export let godetaleList = (id:string) => {

    return request('/goods/detail', {

        method: 'get',
        params: {
            id
        },  

    })
}


//购物车接口
export let getlist = () => {
    return request('/cart/index', {
        method: 'GET',
    })
}
export let check = () => {
    return request('/cart/checked',
        {
            method: 'POST'
        })
}
//删除
export let deleteCart = (data:any) => {
    return request('/cart/delete',
        {
            method: 'POST',data
        })
}
//购物车商品数量
export let getCount = () => {
    return request('/cart/goodscount',
        {
            method: 'GET',
            
        })
}
export let getAdd = () => {
    return request('/address/list',
        {
            method: 'get',
            
        })
}
=======
/*
 * @Description: 
 * @Version: 2.0
 * @Autor: 张磊
 * @Date: 2020-11-18 20:23:33
 * @LastEditors: 张磊
 * @LastEditTime: 2020-11-19 10:56:03
 * @FilePath: \marker\src\api\user.ts
 */
import {request} from 'umi'
import {ILoginData} from '@/utils/types'
//登录接口
export const login=(data:ILoginData)=>{
    return request('/auth/loginByMobile',{
        method:'POST',
        params:{},
        data:data
    })
}

>>>>>>> songchao
